home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_12_06
/
plauger
/
sposequa.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-04-04
|
543b
|
18 lines
-------------- Listing 5: The function streampos::operator== ------------
// sposequa -- streampos::operator==(const streampos&)
#include <streambuf>
_Bool streampos::operator==(const streampos& rop) const
{ // compare for equality
if (_Fp._Off == _BADOFF || rop._Fp._Off == _BADOFF)
return (_Fp._Off == _BADOFF && rop._Fp._Off == _BADOFF
? 1 : 0);
else
return (_Pos + _Fp._Off == rop._Pos + rop._Fp._Off
&& _Fp._Wstate._Wchar == rop._Fp._Wstate._Wchar
&& _Fp._Wstate._State == rop._Fp._Wstate._State);
}